Skip to content

fix: add Reset Harness Data recovery option for startup failures - #81

Open
yaojin3616 wants to merge 1 commit into
mainfrom
codex/fix-harness-startup-failure
Open

fix: add Reset Harness Data recovery option for startup failures#81
yaojin3616 wants to merge 1 commit into
mainfrom
codex/fix-harness-startup-failure

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

Problem

When Harness state becomes corrupted (e.g., after an update or crash), the app fails to start. Users currently have to manually find and delete the ~/Library/Application Support/dsh-desktop folder to recover, which is not discoverable.

Solution

Add a Reset Data button to the Harness startup failure dialog that:

  • Backs up the current harness/ directory with a timestamp (e.g., harness-backup-2026-08-18T09-...)
  • Creates a fresh harness directory
  • Automatically retries startup

This gives users a self-service recovery option directly in the app, without needing to know where application data is stored on disk. The backup preserves user data in case they need to recover anything.

Changes

  • Added resetHarnessData() function that renames the harness home to a timestamped backup and recreates it
  • Updated the failure dialog to include a "Reset Data" button (both English and Chinese)
  • Added localized error handling for when the reset itself fails

Closes #68

When the Harness process fails to start due to corrupted state, users
currently have to manually delete the Application Support folder to recover.
This change adds a 'Reset Data' button to the startup failure dialog that:

- Backs up the current harness directory with a timestamp
- Creates a fresh harness directory
- Automatically retries startup

This gives users a discoverable way to recover from corrupted state without
needing to know where the application data is stored on disk.

Closes #68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

插件造成无法启动,很严重,删除dsh目录,卸载重装,也无法启动

1 participant